package com.jiang.jixiang.ui;

import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;

import com.jiang.jixiang.databinding.ActivitySuccessBinding;
import com.ws.universal.tools.base.BaseActivity;
import com.ws.universal.tools.base.ManageActivity;

public class SuccessActivity extends BaseActivity {
    private ActivitySuccessBinding binding;
    private Bundle bundle;
    private String hintOne;
    private String hintTwo;

    @Override
    protected void initCreate(Bundle savedInstanceState) {
        ManageActivity.putActivity(this.getClass().getSimpleName(), this);
        binding = ActivitySuccessBinding.inflate(getLayoutInflater());
        setContentView(binding.getRoot());
        bundle = getIntent().getExtras();
        hintOne = bundle.getString("hintOne");
        hintTwo = bundle.getString("hintTwo");
    }

    @Override
    protected void initView() {
        binding.btnSubmit.setOnClickListener(view -> {
            finish();
        });
        binding.tvHintOne.setText(hintOne);
        binding.tvHintTwo.setText(hintTwo);

        if (TextUtils.isEmpty(hintTwo)) {
            binding.tvHintTwo.setVisibility(View.GONE);
        }


    }

    @Override
    protected void FinishDesTroy() {
        ManageActivity.removeActivity(this.getClass().getSimpleName());
    }

}
